namespace TabControlLib.Tools
{
    public static class ArithmeticHelper
    {
        public static int[] DivideInt2Arr(int num, int count)
        {
            var arr = new int[count];
            var div = num / count;
            var rest = num % count;

            for (var i = 0; i < count; i++)
            {
                arr[i] = div;
                if (i < rest)
                {
                    arr[i]++;
                }
            }

            return arr;
        }
    }
}
